/*
 * jxSwing Project (2014)
 * 
 * by Denilson Edinaldo Pinto
 * 
 * LGPL
 * Copyright (C) 2014
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.jxSwing.component.frame;

import javax.swing.JDesktopPane;

import org.jxSwing.component.label.OperatingSystemLabel;
import org.jxUtils.check.CheckUtil;
import org.jxUtils.i18n.I18N;

/**
 * @author Denilson Edinaldo Pinto
 * @porject jxSwing
 * @package org.jxSwing.component.frame
 * @date 23/11/2014 - 11:09:56
 */
public final class OperatingSystemInternalFrame extends InternalFrame {
	
	private static final long serialVersionUID = -8455019496918990851L;
	
	/**
	 * @param owner
	 * @wbp.parser.constructor
	 */
	public OperatingSystemInternalFrame(JDesktopPane owner) {
	
		super(owner);
		
		initGUI();
	}
	
	/**
	 * @param title
	 */
	public OperatingSystemInternalFrame(String title) {
	
		super(title, false);
		
		initGUI();
	}
	
	/**
	 * @param title
	 * @param closable
	 */
	public OperatingSystemInternalFrame(String title, boolean closable) {
	
		super(title, false, closable);
		
		initGUI();
	}
	
	/**
	 * @param title
	 * @param closable
	 * @param iconifiable
	 */
	public OperatingSystemInternalFrame(String title, boolean closable, boolean iconifiable) {
	
		super(title, false, closable, false, iconifiable);
		
		initGUI();
	}
	
	/**
	 * @param title
	 * @param closable
	 * @param iconifiable
	 * @param owner
	 */
	public OperatingSystemInternalFrame(String title, boolean closable, boolean iconifiable, JDesktopPane owner) {
	
		super(title, false, closable, false, iconifiable, owner);
		
		initGUI();
	}
	
	/**
	 * @param title
	 * @param closable
	 * @param owner
	 */
	public OperatingSystemInternalFrame(String title, boolean closable, JDesktopPane owner) {
	
		super(title, false, closable, owner);
		
		initGUI();
	}
	
	/**
	 * @param title
	 * @param owner
	 */
	public OperatingSystemInternalFrame(String title, JDesktopPane owner) {
	
		super(title, false, owner);
		
		initGUI();
	}
	
	/**
	 * 
	 */
	private void initGUI() {
	
		add(new OperatingSystemLabel(true));
		
		setTitle(CheckUtil.isNullOrAbsoluteEmpty(getTitle()) ? I18N.system().operatingSystem() : getTitle());
		setSize(325, 225);
		setResizable(false);
		setClosable(true);
		setVisible(true);
		centralize();
	}
}
